package main

import "fmt"

//定义
var array [5] int

//自动判断长度
var array2 = [2][3] int {
	{1,2,3},
	{4,5,6},
}

func array_func() {
	for index := 0; index < len(array); index++ {
		array[index] = index*2
	}
	for index := 0; index < len(array); index++ {
		fmt.Printf("%d \t", array[index])
	}

	for a := 0; a < 2; a++ {
		fmt.Println("")
		for b := 0; b < 3; b++ {
			fmt.Printf("二维数组：%d \t", array2[a][b])
		}
		fmt.Println("")
	}

}